/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package afroschool.beans;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author AUTRES
 */
@Entity
@Table(name = "anneeacademique")
@NamedQueries({@NamedQuery(name = "Anneeacademique.findByCodeannee", query = "SELECT a FROM Anneeacademique a WHERE a.codeannee = :codeannee"), @NamedQuery(name = "Anneeacademique.findByAnnee", query = "SELECT a FROM Anneeacademique a WHERE a.annee = :annee"), @NamedQuery(name = "Anneeacademique.findByEncours", query = "SELECT a FROM Anneeacademique a WHERE a.encours = :encours")})
public class Anneeacademique implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "codeannee", nullable = false)
    private String codeannee;
    @Column(name = "annee")
    private Integer annee;
    @Column(name = "encours")
    private Boolean encours;

    public Anneeacademique() {
    }

    public Anneeacademique(String codeannee) {
        this.codeannee = codeannee;
    }

    public String getCodeannee() {
        return codeannee;
    }

    public void setCodeannee(String codeannee) {
        this.codeannee = codeannee;
    }

    public Integer getAnnee() {
        return annee;
    }

    public void setAnnee(Integer annee) {
        this.annee = annee;
    }

    public Boolean getEncours() {
        return encours;
    }

    public void setEncours(Boolean encours) {
        this.encours = encours;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codeannee != null ? codeannee.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Anneeacademique)) {
            return false;
        }
        Anneeacademique other = (Anneeacademique) object;
        if ((this.codeannee == null && other.codeannee != null) || (this.codeannee != null && !this.codeannee.equals(other.codeannee))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "afroschool.beans.Anneeacademique[codeannee=" + codeannee + "]";
    }

}
